<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>GetFiles</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>
<body>

<h1>GetFiles</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a href="index.html">exported functions</a>
</div>

<div class=shortdescr>
The <dfn>GetFiles</dfn> function is called to get files from the file
system emulated by the plugin.<br>
(FAR to plugin: <em>"I want those files from your panel, destination is specified"</em>).</div>

<pre class=syntax>
int WINAPI GetFiles(
  HANDLE hPlugin,
  struct PluginPanelItem *PanelItem,
  int ItemsNumber,
  int Move,
  char *DestPath,
  int OpMode
);
</pre>
<h3>Parameters</h3>
<div class=descr>

    <div class=dfn>hPlugin</div>
    <div class=dfndescr>Plugin handle returned by <a href="openplugin.html">OpenPlugin</a>
      or <a href="openfileplugin.html">OpenFilePlugin</a>.</div>
    <div class=dfn>PanelItem</div>
    <div class=dfndescr>Points to an array of <a href="../structures/pluginpanelitem.html">PluginPanelItem</a>
      structures. Each structure describes a file to get.</div>
    <div class=dfn>ItemsNumber</div>
    <div class=dfndescr>Number of elements in the <i>PanelItem</i> array.</div>
    <div class=dfn>Move</div>
    <div class=dfndescr>If zero, files should be copied, if nonzero - moved.</div>
    <div class=dfn>DestPath</div>
    <div class=dfndescr>Destination path to put files. If <i>OpMode</i> flag <dfn>OPM_SILENT</dfn>
      is not set, you can allow the user to change it, but in that case the new
      path must be copied to <i>DestPath</i>.</div>
    <div class=dfn>OpMode</div>
    <div class=dfndescr>Combination of the <a href="../defs/operation_mode.html">operation mode</a> flags.
      This function should be ready to process OPM_SILENT, OPM_FIND, OPM_VIEW,
      OPM_QUICKVIEW and OPM_EDIT flags. Also it can process OPM_DESCR and OPM_TOPLEVEL to speed up
      operation if necessary.</div>

</div>

<h3>Return value</h3>
<div class=descr>
If the function succeeds, the return value must be 1.
If the function fails, 0 should be returned.
If the function was interrupted by the user, it should return -1.
</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
<li>The plugin should process "its folders" by itself.
<li>If the operation has failed, but part of the files was successfully processed, the plugin can
    remove selection only from the processed files. To perform it, plugin should clear the
    <a href="../structures/pluginpanelitem.html#PPIF_SELECTED">PPIF_SELECTED</a> flag for processed
    items in the <var>PluginPanelItem</var> list passed to function.
<li>This function is called only for plugins that implement virtual file systems.
For this it is necessary to remove the <a href="../structures/openplugininfo.html#OPIF_REALNAMES">OPIF_REALNAMES</a>
flag when <a href="getopenplugininfo.html">GetOpenPluginInfo</a> is called, otherwise this function
will never be called.
</ol>
</div>

<div class=see>See also:</div><div class=seecont>
<a href="putfiles.html">PutFiles</a>,
<a href="../service_functions/getdirlist.html">GetDirList</a>,
<a href="../service_functions/getplugindirlist.html">GetPluginDirList</a>
</div>

</body>
</html>